// const baseUrl="http://127.0.0.1:1730"
// const baseUrl="http://43.143.211.211:1730"

const baseUrl="https://61211w73f7.zicp.fun"

const appName = "宏鼎烘焙"

export const getbaseUrl=()=>{
    return baseUrl
}

export const shopName = ()=>{
     return appName
}

export const requestUtil =(obj)=>{
   return new Promise((resolve,reject)=>{
        wx.request({
           ...obj,
           url:baseUrl+obj.url,
           success:(res)=>{
                resolve(res)
           },
           fail:(err)=>{
                reject(err)
           },
           complete:()=>{
                wx.hideLoading()
           }
        })
       
   })
    // console.log({...obj,url:baseUrl+obj.url})
}